package com.jsbs.iam.ident.service;
import com.github.pagehelper.PageInfo;
import com.jsbs.iam.ident.dto.IamPasswordStrategyDto;
import com.jsbs.iam.ident.dto.PasswordStrategySearchDto;
import com.jsbs.iam.ident.entity.IamLoginStrategy;
import com.jsbs.iam.ident.vo.IamPasswordStrategyVo;

import java.util.List;

/**
 * @author zhouxiangyang
 * @className IIamPasswordStrategyService
 * @date 2022/12/9 13:26
 * @description:
 */
public interface IIamPasswordStrategyService {

    /**
     * 全量密码策略分页查询
     * @param passwordStrategySearchDto
     * @return
     */
    PageInfo<IamPasswordStrategyVo> getIamPasswordStrategyList(
            PasswordStrategySearchDto passwordStrategySearchDto,
            String companyCode);

    /**
     * 根据策略编码批量删除策略信息
     * @param StrategyCodeList
     * @return
     */
    int deleteBatchStrategyCode (List<String> StrategyCodeList,String companyCode);

    /**
     * 新增策略
     * @return
     * @param iamPasswordStrategyDto
     */
    int saveIamPasswordStrategy (IamPasswordStrategyDto iamPasswordStrategyDto) throws Exception;

    /**
     * 策略修改
     * @param iamPasswordStrategyDto
     * @return
     */
    int updateIamPasswordStrategy(IamPasswordStrategyDto iamPasswordStrategyDto) throws Exception;

    /**
     * sso登录策略配置查询
     * @param applyTypeCode
     * @return
     */
    List<IamLoginStrategy> getIamLoginStrategy(String applyTypeCode,String companyCode);

    /**
     * sso登录策略配置
     * @param iamLoginStrategyList
     * @return
     */
    int saveIamLoginStrategy(List<IamLoginStrategy> iamLoginStrategyList) throws Exception;

    /**
     * 根据应用类型编码查询密码策略信息
     * @param applyTypeCode
     * @return
     */
    IamPasswordStrategyVo queryPasswordStrategy (String applyTypeCode,String companyCode);
}
